package com.google.samples.apps.library_common.extension

fun <T> listIsEmpty(list: Collection<T>?): Boolean = list == null || list.isEmpty()
fun <T> listIsNotEmpty(list: Collection<T>?): Boolean = list != null && list.isNotEmpty()
fun textIsEmpty(text: CharSequence?): Boolean = text == null || text.isEmpty() || "null" == text
fun textIsNotEmpty(text: CharSequence?): Boolean = !textIsEmpty(text) /*text != null && !text.isEmpty() */
fun vIsEmpty(text: Any?): Boolean = text == null
fun vIsNotEmpty(text: Any?): Boolean = text != null
fun textIsUrl(text: CharSequence?): Boolean = textIsNotEmpty(text) && text!!.startsWith("http")
